package com.imc.api.attence.dao.repository;

import com.imc.api.attence.pojo.LeaveDetail;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.List;

/*
 * 类描述：请假详情Repository
 * 开发者：tanweiping
 * 创建日期：2018/10/28 20:48
 */
@Repository
public interface LeaveDetailRepository extends JpaRepository <LeaveDetail, Integer>, JpaSpecificationExecutor <LeaveDetail> {

    /*
     * YT  2018/10/28 20:48
     * 方法描述：更具请假ID查询所有的请假详情信息
     */
    @Query(value = "select * from t_leave_detail where leaveId = :leaveId", nativeQuery = true)
    List <LeaveDetail> findByleaveId(@Param("leaveId") String leaveId);
}
